Skip to content

tui: plumb permission profile selection#23708

Merged
viyatb-oai merged 16 commits into
mainfrom
codex/viyatb/tui-permission-profile-selection
May 21, 2026
Merged

tui: plumb permission profile selection#23708
viyatb-oai merged 16 commits into
mainfrom
codex/viyatb/tui-permission-profile-selection

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented May 20, 2026

Why

The named-profile /permissions picker needs a small TUI action path that can select permission profiles without folding the menu UI and profile metadata into the same review.

What changed

  • Carry permission-profile selections through the TUI app event flow.
  • Persist selected profiles while preserving the existing approval settings and guardrail prompts.
  • Keep the legacy /permissions picker behavior in this layer; the profile-mode menu stays in the follow-up PR.

Stack

  1. #22931: runtime/session/network propagation for active permission profiles.
  2. This PR: TUI selection plumbing and guardrail flow.
  3. #21559: profile-aware /permissions menu and custom profile display.
image

Validation

  • git diff --cached --check before commit.
  • Full test run skipped at the user request while pushing the split stack.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13bae1d6ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/app/config_persistence.rs
Comment thread codex-rs/tui/src/chatwidget/settings.rs Outdated
Comment thread codex-rs/tui/src/app/event_dispatch.rs
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/profile-permissions-runtime branch from e0764d3 to 923b79d Compare May 20, 2026 21:01
@viyatb-oai viyatb-oai requested a review from a team as a code owner May 20, 2026 21:01
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/tui-permission-profile-selection branch from ce7ae38 to ef21b6b Compare May 20, 2026 21:02
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/profile-permissions-runtime branch from 923b79d to 9badcc1 Compare May 20, 2026 21:04
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/tui-permission-profile-selection branch from ef21b6b to 8e8150c Compare May 20, 2026 21:05
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/tui-permission-profile-selection branch from 8e8150c to c83b8db Compare May 20, 2026 21:27
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/tui-permission-profile-selection branch from c83b8db to 3ee4233 Compare May 20, 2026 21:39
viyatb-oai added a commit that referenced this pull request May 20, 2026
## Why

Once a named permission profile is selected, runtime state has to keep
that profile identity intact instead of collapsing back to anonymous
effective permissions. The session refresh path also needs to rebuild
profile-derived network proxy state so active profile switches take
effect consistently.

## What changed

- Preserve the active permission profile through session updates.
- Rebuild profile-derived runtime/network configuration when the active
profile changes.
- Keep the runtime path aligned with the current session configuration
APIs.
- Tighten the affected tests, including the Windows delete-pending
memory-file case that was intermittently tripping CI.

## Stack

1. **This PR**: runtime/session/network propagation for active
permission profiles.
2. [#23708](#23708): TUI selection
plumbing and guardrail flow.
3. [#21559](#21559): profile-aware
`/permissions` menu and custom profile display.

<img width="1296" height="906" alt="image"
src="https://github.com/user-attachments/assets/077fa3a7-80cb-4925-80b1-d2395018d90a"
/>
Base automatically changed from codex/viyatb/profile-permissions-runtime to main May 20, 2026 21:55
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai enabled auto-merge (squash) May 20, 2026 23:32
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, approved 👍

@viyatb-oai viyatb-oai merged commit fcff0d6 into main May 21, 2026
31 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/tui-permission-profile-selection branch May 21, 2026 15:26
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants